package com.wind.framework.bean;

import org.apache.commons.collections.map.HashedMap;

import java.util.Map;

/**
 * @author： BeiYan
 * @Date： 2016-11-27 14:50
 * @Description:返回视图对象
 */

public class View {

    /**
     * 视图路径
     */
    private String path;

    /**
     * 数据模型
     */
    private Map<String, Object> model;

    public View(String path) {
        this.path = path;
        model = new HashedMap();
    }

    public View addModel(String key, Object value) {
        model.put(key, value);
        return this;
    }

    public String getPath() {
        return path;
    }

    public Map<String, Object> getModel() {
        return model;
    }
}

